package com.hj.lib.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.file.FileWriter;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

public class JavaBrowserImpl {

	public static String ipPath = "C:\\hjlog\\pz.txt";
	public JavaBrowserHd javaBrowserHd;
	public JavaBrowserImpl(JavaBrowserHd javaBrowserHd) {
		this.javaBrowserHd = javaBrowserHd;
	}
	public void alert(String args)
	{
		System.out.println(ipPath+"---->"+args);
		File file = new File(ipPath);
		File dir = new File("C:\\hjlog\\");
		if (!dir.exists()) {
			dir.mkdirs();
		}
		if (!file.exists()) {
			try {
				file.createNewFile();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		FileWriter writer = new FileWriter(ipPath);
		writer.write(args);
		this.javaBrowserHd.sz();

	}
}
